package goodroommate.service;

import java.sql.Timestamp;
import java.util.ArrayList;

import goodroommate.domain.Answer;
import goodroommate.domain.Option;
import goodroommate.domain.Questionnaire;
import goodroommate.exception.DatabaseException;
import goodroommate.exception.ItemNotExistsException;

public interface IQuestionnaireService {

	public Questionnaire addQuestionnaire(String subject, Timestamp starttime, Timestamp endtime)
			throws DatabaseException;

	public boolean addQuestion(long questionnaireid, String name, String type, ArrayList<Option> options)
			throws DatabaseException;

	public ArrayList<Questionnaire> getAllQuestionnaire() throws DatabaseException, ItemNotExistsException;

	public Questionnaire getQuestionnaireByQuestionnaireID(long questionnaireid)
			throws DatabaseException, ItemNotExistsException;

	public boolean addAnswer(ArrayList<Answer> answers) throws DatabaseException;

	public ArrayList<Questionnaire> getMyQuestionnaires(long userid) throws DatabaseException, ItemNotExistsException;

	public ArrayList<Answer> getMyAnswersByQuestionnaireID(long userid, long questionnaireid)
			throws DatabaseException, ItemNotExistsException;
}
